3 subject="""comment 1"""
4 date="2018-05-21T15:46:22Z"
6 It wouldn't have actually copied 140 gb of files, unless you're using git-annex
7 on a filesystem that does not support hard links. If it used hard links,
8 it would not waste much space while running.
10 There may be edge cases where, if git-annex proxy did not copy/hard link
11 ignored files from the work tree to its temporary directory, the proxied
12 git command would not behave the same as an unproxed git command.
14 Let's see, such edge cases would have to involve a gitignored file that
15 is still somehow affected by the proxied git command.
17 The obvious case is, you have `.*` gitignored, and you run `git annex proxy
18 -- git add .foo --force` to add the ignored file. If git-annex didn't copy
19 `.foo`, that would fail, albeit in a fairly obvious way.
21 Another problem case: You have `.*` gitignored, and you have a local
22 file `.foo` which is not checked in. You run
23 `git annex proxy -- git merge branch`, and the branch happens to add
24 `.foo` with different contents. The merge would normally fail, because
25 there are conflicting changes in the working tree. If proxy were
26 changed, the proxied merge would succeed. The local changes in this
27 case get lost. I've verified that this change causes data loss in this
30 So, the current behavior is the safe and right behavior; git-annex should
31 not lose data by default to optimise for an unusual edge case.
33 It could be an option, but it would have to be flagged as causing data
34 loss in some situations involving local modifications to gitignored files,
35 and causing proxied git behavior to differ from non-proxied git behavior
36 in other situations. I don't know if the potential benefit is worth the
39 The code change is very simple if you want to play with it. In
40 Command/Proxy.hs find the Git.LsFiles line and change "True" to "False".